package com.duing.service;

import com.duing.bean.Guest;
import com.duing.dao.GuestDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GuestServiceimpl implements GuestService{
    @Autowired
    private GuestDao dao;

    public List<Guest> list() {

        return dao.getGuestList();
    }


    public void add(Guest guest) {
        dao.add(guest);
    }


    public void update(Guest guest) {
            dao.update(guest);
    }


    public Guest get(String name) {

        return  dao.get(name);
    }


    public void delete(String name) {
            dao.delete(name);
    }
}
